#!/usr/bin/env python

import sys

def data_gen ():
    line = sys.stdin.readline()
    while line:
        try:
            val = int(line)
            yield val
        except:
            pass
        line = sys.stdin.readline()

COUNT = 8
MIX = 0.95

gen = data_gen()
buf = []
output = None
for emt in gen:
    if output == None:
        output = emt
    buf.append(emt)
    if len(buf) == COUNT:
        sum = 0.0
        for i in range(COUNT):
            sum += buf[i]
        output = int(MIX * output + (1-MIX) * int(sum / COUNT))
        print output
        del buf[0]
    else:
    	print buf[-1]
